package com.macro.mall.wms.service;

import com.macro.mall.common.api.CommonPage;
import com.macro.mall.common.api.CommonResult;
import com.macro.mall.model.WmsOutStorage;
import com.macro.mall.model.WmsOutStorageItem;
import com.macro.mall.param.WmsOutStorageDto;
import com.macro.mall.wms.dto.OutStorageDto;
import com.macro.mall.wms.dto.WmsOutStorageItemDTO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * 商品出库管理
 *
 * @Author 黄川
 * @Date 2020/9/10 16:27
 */
@Service
public interface WmsOutStorageService {

    /**
     * 查询门店所有出库单
     */
    List<WmsOutStorageDto> getList(Long storeId, WmsOutStorage wmsOutStorage, Integer pageSize, Integer pageNum);

    /**
     * 根据id查询出库单详情
     */
    CommonResult <OutStorageDto> getOutStorage(Long id);

    /**
     * 新增出库单
     */
    @Transactional
    CommonResult create(Long storeId, Long memberId, String memberUserName,OutStorageDto outStorageDto);

    /**
     * 未审核修改出库单
     */
    @Transactional
    CommonResult reviewed(Long id,Long storeId, Long memberId, String memberUserName, OutStorageDto outStorageDto);

    /**
     * 审核出库单，修改库存
     */
    @Transactional
    CommonResult update(Long id, Long storeId, Long memberId, String memberUserName,Integer adminType);

    /**
     * 删除未审核的出库单
     */
    @Transactional
    CommonResult delete(Long id, Long memberId );

    /**
     * 通过出库单id获取出库单下的商品列表
     * @param orderId
     * @return
     */
    List<WmsOutStorageItemDTO> getOutStorageItems(Long orderId);
}
